1. Field of the Invention
The present invention relates to polling methods and apparatus in which when an interrupt request to a control unit occurs at one of a plurality of interrupt request generating means, the control unit locates that interrupt request generating means by polling them and, more particularly, to such polling methods and apparatus in which the interrupt request generating means which has generated the interrupt request is located efficiently in a short time however many such interrupt request generating means there may be.
2. Description of the Prior Art
There is, for example, a high speed multimedium multiplexer which locates which of a plurality of interrupt request generating means has generated an interrupt request. The multiplexer packets the output data from various terminal units such as telephone sets and/or data terminal units and sends the data via high-speed digital lines in a time sharing manner to destination terminal units. FIG. 10 schematically illustrates the structure of the multiplexer which includes a control unit 1 which in turn includes a central processing unit (CPU), a plurality of bus relay units 2 (21-2M) which distribute and relay an address bus AB, a control bus CB, a multiplexing data bus hD and a data bus DB from a plurality of groups of N terminal interface units 3 (31, 32, . . . ; 3(K-1), 3K, . . . ; . . . ,3N) (N=M in the particular embodiment), and a line interface unit 4 which multiplexes the outputs from the terminal interface units 31 . . . 3N collected through the multiplexing data bus and hD and sends the data to a high speed digital line HD.
The individual terminal interface units 3 are connected to corresponding terminals (not shown) such as telephone sets a data terminals and function as the interrupt request generating means. When the following interrupt conditions occur at these terminal units:
1) a rise in the operation, PA1 2) the transmission of signalling data (telephone number data), and PA1 3) a change in the state, PA1 ((the number of groups)+(the number of terminal interfaces per group)).times.(a cycle time required to one polling operation)
the corresponding terminal interfaces detect these conditions and generate predetermined interrupt requests to the control unit 1.
When the control unit 1 receives such an interrupt request from any of the terminal interface units 3, it performs a polling operation on the terminal interface units sequentially, starting with the first one 31 to locate the terminal interface unit which has generated the interrupt request and executes a predetermined interrupt processing operation for collecting the data in accordance with the location of the interface unit.
The polling operation performed by the control unit 1 will now be described in more detail. Assume now that an interrupt condition occurs at a terminal unit corresponding to a K.sup.th terminal interface unit 3K, so that the terminal interface unit generates an interrupt request to the control unit 1 via the control bus CB. The individual terminal interface units 3 each include a vector register which indicates a reference number to the control unit 1 when the interrupt request is generated. The K.sup.th terminal interface unit 3K of interest also sets in the vector register thereof a vector number corresponding to its inherent address when it has generated the interrupt request.
The control unit 1 starts a polling operation in accordance with the generation of the interrupt request. In the polling, the control unit 1 first designates a first one 31 of the terminal interface units 3 and reads the contents of its vector register through the data bus DB. Unless the contents of the register contain a vector number, the control unit designates a second terminal interface unit 32 and repeats similar operations. In this way, the control unit 1 repeats the operation of designating the terminal interface units sequentially though the address bus AB and reading the contents of their vector registers through the data bus DB. Thus when the control unit designates a K.sup.th terminal interface 3K and reads the contents of its vector register, it detects that the vector number is contained in the register contents and locates that the terminal interface which has generated the interrupt request is the K.sup.th terminal interface unit 3K.
As just described above, in the multiplexer illustrated in FIG. 10, a terminal interface unit which generates an interrupt request to the control unit 1 in accordance with the occurrence of a corresponding interrupt condition sets in the vector register thereof a vector number corresponding to the address of that terminal interface unit. Therefore, there is a one-to-one correspondence between the physical address and vector number of each of the terminal interfaces. If the control unit 1 can only read a vector number by polling, it can located the terminal interface which has issued the interrupt request.
The control unit 1 has a look-up table in which there is a one-to-one correspondence between the physical position or address of each terminal interface unit and an interrupt condition to be generated, so that the control unit can know what the interrupt condition generated by a terminal interface is by locating the corresponding physical position of the terminal interface unit which has generated the interrupt request. In the multiplexer, the individual terminal interface units are allocated to corresponding interrupt conditions.
In the polling method performed by the multiplexer shown in FIG. 10, the plurality of terminal interfaces are polled sequentially to ascertain the presence of a generated interrupt request, so that a total of required polling times is not more than EQU 400 ns.times.128=51.2 .mu.s
if the cycle time required for one polling operation is 400 ns and the number of terminal interfaces is 128 (N=128) or so. However, if the whole scale of the multiplexer becomes large, so that, for example, 2,048 terminal interfaces (N=2048) are needed, a total of required polling times is very long and given by EQU 400 ns.times.2,048=819.2 .mu.s.
Therefore, according to the polling method, if the number of terminal interfaces is relatively small and if there are no limitations on the time required for the control unit 1 to process interrupt requests from the terminal interfaces even if the number of terminal interfaces is large, the control unit can effectively locate a generated source of interrupt request. However, if a great many terminal interfaces are needed in a multiplexer in which the time for processing a generated interrupt request is limited, it is impossible to continue to efficiently locate the source of the interrupt request constantly.